import {useState, useEffect} from 'react'
import PullRefreshList from '../../components/pullRefreshList/index.jsx';
import Tabbar from '../../components/Tabbar/index.jsx'
import FloorDate from '../../components/FloorLIst/index.jsx'
import request from '../../utils/request.jsx'
const Shop = () => {
    const [shop, setShop] = useState([])
    const [data, setDate] = useState([])
    let shopping = JSON.parse(localStorage.getItem('shop'))
    useEffect(()=> {
        shopDate()
    },[])
    const shopDate = async () => {
        setShop(shopping)
        let {data} = await request.get('/productDetails')
        setDate(data)
    }
    return (
        <div>This is Shop
            <PullRefreshList data={shop} />
            <div>推荐列表</div>
             <FloorDate data={data}/>
            <Tabbar/>
            </div>
    )
}

export default Shop;